home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 2583 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: erich.triumf.ca!bennett
  2. From: bennett@erich.triumf.ca (P.Bennett)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: How to display numbers in Borland C graphics
  5. Date: 22 Jan 1996 08:17 PST
  6. Organization: TRIUMF: Tri-University Meson Facility
  7. Distribution: world
  8. Message-ID: <22JAN199608175437@erich.triumf.ca>
  9. References: <4e0a1a$b5h@tst.hk.super.net>
  10. NNTP-Posting-Host: erich.triumf.ca
  11. News-Software: VAX/VMS VNEWS 1.50    
  12.  
  13. In article <4e0a1a$b5h@tst.hk.super.net>, chiasw@hk.super.net writes...
  14. >HELP:
  15. >I am a novice in C programming. I found that Borland C graphics function only
  16. >accepts text string for display during graphics mode. How can I display 
  17. >some calculated values in graphics mode (i.e. to display numerical values di
  18. >rectly in graphics mode?
  19. >Alternately, is there any quick way to convert numerical value into a st ring for 
  20. >display by graphics function?
  21.  
  22. Use sprintf() to "print" the numbers to a char array, then use the text display
  23. function to put that string on the screen.
  24.  
  25. sprintf() works just like printf(), except that it puts its output in a char
  26. array.
  27.  
  28. Peter Bennett VE7CEI                | Vessels shall be deemed to be in sight
  29. Internet: bennett@triumf.ca         | of one another only when one can be
  30. Packet: ve7cei@ve7kit.#vanc.bc.ca   | observed visually from the other
  31. TRIUMF, Vancouver, B.C., Canada     |                          ColRegs 3(k)
  32. GPS and NMEA info and programs: ftp://sundae.triumf.ca/pub/peter/index.html
  33.  
  34.  
  35.  
  36.  
  37.  
  38.